import React from 'react';
import {
    Outlet,
    useNavigate,
    Navigate
} from "react-router-dom"
function My(props) {
    const navigate = useNavigate();
    // if(localStorage.getItem("token")){
        return (
            <div>
                <h3>个人中心</h3>
                <button onClick={()=>navigate("/my")}>我的新闻</button>
                <button onClick={()=>navigate("/my/goodsList")}>我的商品</button>
                <Outlet/>
                <Outlet/>
                <Outlet/>
                <Outlet/>
                <Outlet/>
                <Outlet/>
                <Outlet/>
            </div>
        );
    // }
    // return <Navigate to={"/"}/>

}

export default My;